package com.ynet.middleground.riskmanage.bean.hangxin;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.ynet.core.common.BaseReqObj;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.*;
import java.util.List;
import java.util.Map;

/**
 * @author songyf
 * @description 发票开具请求信息
 * @date 2021-11-09 16:04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "发票开具请求信息", description = "发票开具请求信息")
public class InvoiceIssuedReq extends BaseReqObj {

    private static final long serialVersionUID = -8706815633352707071L;

    @ApiModelProperty(value = "企业税号", notes = "企业税号", required = true)
    @NotEmpty(message = "企业税号不能为空")
    @XStreamAlias("QYSH")
    private String qysh;

    @ApiModelProperty(value = "开票终端号", notes = "开票终端号", required = true)
    @NotEmpty(message = "开票终端号不能为空")
    @XStreamAlias("KPZDH")
    private String kpzdh;

    @ApiModelProperty(value = "主分机号,51盒子编号（由青岛航信提供，每个盒子对应一个主分机号）", notes = "主分机号,51盒子编号（由青岛航信提供，每个盒子对应一个主分机号）", required = true)
    @NotEmpty(message = "主分机号不能为空")
    @XStreamAlias("ZFJH")
    private String zfjh;

    @ApiModelProperty(value = "发票流水号,对应单据订单号或流水号（主键）", notes = "发票流水号,对应单据订单号或流水号（主键）", required = true)
    @NotEmpty(message = "发票流水号不能为空")
    @XStreamAlias("FPLSH")
    private String fplsh;

    @ApiModelProperty(value = "发票提取码,对应单据订单号或流水号（主键）若没有则同发票流水号", notes = "发票提取码,对应单据订单号或流水号（主键）若没有则同发票流水号", required = true)
    @NotEmpty(message = "发票提取码不能为空")
    @XStreamAlias("FPTQM")
    private String fptqm;

    @ApiModelProperty(value = "发票种类,0:专票2:普票41:卷票51：电票 52:电专", notes = "发票种类,0:专票2:普票41:卷票51：电票 52:电专", required = true)
    @NotEmpty(message = "发票种类不能为空")
    @XStreamAlias("FPZL")
    private String fpzl;

    @ApiModelProperty(value = "开票类型,0-蓝票 1-红票", notes = "开票类型,0-蓝票 1-红票", required = true)
    @NotEmpty(message = "开票类型不能为空")
    @XStreamAlias("KPLX")
    private String kplx;

    @ApiModelProperty(value = "开票模式,1-同步开票3-异步开票", notes = "开票模式,1-同步开票3-异步开票", required = true)
    @NotEmpty(message = "开票模式不能为空")
    @XStreamAlias("KPMS")
    private String kpms;

    @ApiModelProperty(value = "开票来源,1-51盒子", notes = "开票来源,1-51盒子", required = true)
    @NotEmpty(message = "开票来源不能为空")
    @XStreamAlias("KPLY")
    private String kply;

    @ApiModelProperty(value = "销方税号", notes = "销方税号", required = true)
    @NotEmpty(message = "销方税号不能为空")
    @XStreamAlias("XFSH")
    private String xfsh;

    @ApiModelProperty(value = "销方名称", notes = "销方名称", required = true)
    @NotEmpty(message = "消防名称不能为空")
    @XStreamAlias("XFMC")
    private String xfmc;

    @ApiModelProperty(value = "销方地址电话", notes = "销方地址电话", required = true)
    @NotEmpty(message = "销方地址电话不能为空")
    @XStreamAlias("XFDZDH")
    private String xfdzdh;

    @ApiModelProperty(value = "销方银行账号", notes = "销方银行账号", required = true)
    @NotEmpty(message = "销方银行账号不能为空")
    @XStreamAlias("XFYHZH")
    private String xfyhzh;

    @ApiModelProperty(value = "购方税号", notes = "购方税号")
    @XStreamAlias("GFSH")
    private String gfsh;

    @ApiModelProperty(value = "购方名称", notes = "购方名称", required = true)
    @NotEmpty(message = "购方名称不能为空")
    @XStreamAlias("GFMC")
    private String gfmc;

    @ApiModelProperty(value = "购方地址电话", notes = "购方地址电话")
    @XStreamAlias("GFDZDH")
    private String gfdzdh;

    @ApiModelProperty(value = "购方银行账号", notes = "购方银行账号")
    @XStreamAlias("GFYHZH")
    private String gfyhzh;

    @ApiModelProperty(value = "开票人", notes = "开票人", required = true)
    @NotEmpty(message = "开票人不能为空")
    @XStreamAlias("KPR")
    private String kpr;

    @ApiModelProperty(value = "收款人", notes = "收款人", required = true)
    @NotEmpty(message = "收款人不能为空")
    @XStreamAlias("SKR")
    private String skr;

    @ApiModelProperty(value = "复核人", notes = "复核人", required = true)
    @NotEmpty(message = "复核人不能为空")
    @XStreamAlias("FHR")
    private String fhr;

    @ApiModelProperty(value = "原发票代码,红字发票时必填", notes = "原发票代码,红字发票时必填")
    @XStreamAlias("YFPDM")
    private String yfpdm;

    @ApiModelProperty(value = "原发票号码,红字发票时必填", notes = "原发票号码,红字发票时必填")
    @XStreamAlias("YFPHM")
    private String yfphm;

    @ApiModelProperty(value = "红票通知单编号,红字专用发票（电专）时必填", notes = "红票通知单编号,红字专用发票（电专）时必填")
    @XStreamAlias("HPTZDBH")
    private String hptzdbh;

    @ApiModelProperty(value = "价税合计,单位：元 含税金额（2位小数）", notes = "价税合计,单位：元 含税金额（2位小数）", required = true)
    @NotEmpty(message = "价税合计不能为空")
    @XStreamAlias("JSHJ")
    private String jshj;

    @ApiModelProperty(value = "合计金额(不含税),单位：元 不含税金额（2位小数）", notes = "合计金额(不含税),单位：元 不含税金额（2位小数）", required = true)
    @NotEmpty(message = "合计金额不能为空")
    @XStreamAlias("HJJE")
    private String hjje;

    @ApiModelProperty(value = "合计税额,单位：元 （2位小数）", notes = "合计税额,单位：元 （2位小数）", required = true)
    @NotEmpty(message = "合计税额不能为空")
    @XStreamAlias("HJSE")
    private String hjse;

    @ApiModelProperty(value = "备注,蓝票最大长度 200，红票152", notes = "备注,蓝票最大长度 200，红票152")
    @XStreamAlias("BZ")
    private String bz;

    @ApiModelProperty(value = "推送内容", notes = "推送内容")
    @XStreamAlias("COMMON_NODES")
    private CommonNodes commonNodes;

    @ApiModelProperty(value = "详细信息集合", notes = "详细信息集合", required = true)
    @NotNull(message = "详细信息集合不能为空")
    @XStreamAlias("FPXMXX")
    private Fpxmxx fpxmxx;
}
